<template>
  <!-- home搜索结果页-->
 <div class="collection-record">
     <!-- <HeaderCom ></HeaderCom> -->
     <NavCom :showMoreBtn ="false" :navTabs='navTabs' @navCom="navCom"></NavCom>
     <component  :is ='currentView'></component>
 </div>
</template>

<script>
import HeaderCom from '../components/headerCom.vue'//头部
import NavCom from '../components/navCom.vue'//直播状态
import MyCollection from './myCollection.vue' //我的收藏
import HistoryRecord from './historyRecord.vue' //历史记录
  export default {
     components:{
       NavCom,
       MyCollection,
       HistoryRecord,
       HeaderCom,
     },
    props: {
        greatViewList:Array,
    },
    data() {
      return {
          currentView:MyCollection,
          navTabs:[{title:'我的收藏',id:1},{title:'历史记录',id:2},],
      };
    },
    computed: {},
    created() {
       fun.componentCreated({channle:'zhxyk',isFirstPage:'0'});//isFirstPage  1-跳转首页，0-返回上页，-1:隐藏公用标题，使用三方页面标题，closePage：关闭当前页面
    },
    mounted() {},
    methods: {
     navCom(data){
         this.currentView = data.data.title=='我的收藏'? MyCollection:HistoryRecord;
     }
    },
    watch: {},
     filters: {

      }
  };
</script>
<style scoped="scoped">
 .collection-record{
  height: 100vh;
  width: 100vw;
 }

.collection-record .nav-bar-box{
    top: 0px;
}
.collection-record /deep/ .van-tabs--line .van-tabs__wrap{
    padding: 0;
}
.collection-record /deep/ .van-tabs__nav{
    justify-content: center;
}

.collection-record /deep/ .collection-box,.collection-record /deep/ .history-record-box{
  position: absolute;
  top: 88px;

}
.collection-record /deep/ .no-data,.collection-record /deep/ .no-data{
  height: 100%;
}
.collection-record /deep/ .main-box,.collection-record /deep/ .main-box{
  height: 100%;
  padding-bottom: 88px;
}
.collection-record /deep/ .van-list__finished-text,
.collection-record /deep/ .van-list__error-text,
.collection-record /deep/ .van-list__loading,
  .collection-record /deep/ .van-loading__text{
  font-size: 30px;
}
.collection-record /deep/ .van-list__finished-text{
  padding-bottom: 20px;
}
.collection-record /deep/ .collection-box{
  height: calc(100vh - 88px);

}

</style>
